package com.example.chessbattleplatform.web.chess_rooms.Pojo.mappers;

import com.baomidou.mybatisplus.annotation.*;
import com.example.chessbattleplatform.web.chess_rooms.Pojo.Enum.AwaitStatusEnum;
import com.example.chessbattleplatform.web.chess_rooms.Pojo.Enum.RoomTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "ROOMS", schema = "MY_DATABASE")
public class Rooms {

    // 房间的唯一标识符
    @TableId(type = IdType.ASSIGN_UUID)
    private String roomUuid;
    // 房间的唯一房间名称
    private String roomCode;
    // 房间类型，1 表示公开，2 表示私密
    private RoomTypeEnum roomType;
    // 房间状态，可以是 waiting, running, finished
    private AwaitStatusEnum roomStatus;
    // 房间密码 默认为 123456
    private String  roomPassword;

    // 房间的创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    // 房间的最后更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}